using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeoAnalyticsServerTools._SummarizeData
{
    /// <summary>
    /// <para>Aggregate Points</para>
    /// <para>Aggregates points into polygon features or bins. A polygon is returned with a count of points as well as optional statistics at all locations where points exist.</para>
    /// <para>将点聚合为面要素或图格。将返回一个面，其中包含点计数以及存在点的所有位置的可选统计数据。</para>
    /// </summary>    
    [DisplayName("Aggregate Points")]
    public class AggregatePoints : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AggregatePoints()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_point_layer">
        /// <para>Point Layer</para>
        /// <para>The point features to be aggregated into polygons or bins.</para>
        /// <para>要聚合到面或图格中的点要素。</para>
        /// </param>
        /// <param name="_output_name">
        /// <para>Output Name</para>
        /// <para>The name of the output feature service.</para>
        /// <para>输出要素服务的名称。</para>
        /// </param>
        /// <param name="_polygon_or_bin">
        /// <para>Polygon or Bin</para>
        /// <para><xdoc>
        ///   <para>Specifies how the Point Layer will be aggregated.</para>
        ///   <bulletList>
        ///     <bullet_item>Polygon—The point layer will be aggregated into a polygon dataset.</bullet_item><para/>
        ///     <bullet_item>Bin—The point layer will be aggregated into square or hexagonal bins that are generated when the tool is run.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定点图层的聚合方式。</para>
        ///   <bulletList>
        ///     <bullet_item>面—点图层将聚合到面数据集中。</bullet_item><para/>
        ///     <bullet_item>图格—点图层将被聚合为运行工具时生成的方形或六边形图格。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public AggregatePoints(object _point_layer, object _output_name, _polygon_or_bin_value _polygon_or_bin)
        {
            this._point_layer = _point_layer;
            this._output_name = _output_name;
            this._polygon_or_bin = _polygon_or_bin;
        }
        public override string ToolboxName => "GeoAnalytics Server Tools";

        public override string ToolName => "Aggregate Points";

        public override string CallName => "geoanalytics.AggregatePoints";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_point_layer, _output_name, _polygon_or_bin.GetGPValue(), _polygon_layer, _bin_type.GetGPValue(), _bin_size, _time_step_interval, _time_step_repeat, _time_step_reference, _summary_fields, _output, _data_store.GetGPValue()];

        /// <summary>
        /// <para>Point Layer</para>
        /// <para>The point features to be aggregated into polygons or bins.</para>
        /// <para>要聚合到面或图格中的点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _point_layer { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>The name of the output feature service.</para>
        /// <para>输出要素服务的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_name { get; set; }


        /// <summary>
        /// <para>Polygon or Bin</para>
        /// <para><xdoc>
        ///   <para>Specifies how the Point Layer will be aggregated.</para>
        ///   <bulletList>
        ///     <bullet_item>Polygon—The point layer will be aggregated into a polygon dataset.</bullet_item><para/>
        ///     <bullet_item>Bin—The point layer will be aggregated into square or hexagonal bins that are generated when the tool is run.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定点图层的聚合方式。</para>
        ///   <bulletList>
        ///     <bullet_item>面—点图层将聚合到面数据集中。</bullet_item><para/>
        ///     <bullet_item>图格—点图层将被聚合为运行工具时生成的方形或六边形图格。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Polygon or Bin")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _polygon_or_bin_value _polygon_or_bin { get; set; }

        public enum _polygon_or_bin_value
        {
            /// <summary>
            /// <para>Polygon</para>
            /// <para>Polygon—The point layer will be aggregated into a polygon dataset.</para>
            /// <para>面—点图层将聚合到面数据集中。</para>
            /// </summary>
            [Description("Polygon")]
            [GPEnumValue("POLYGON")]
            _POLYGON,

            /// <summary>
            /// <para>Bin</para>
            /// <para>Bin—The point layer will be aggregated into square or hexagonal bins that are generated when the tool is run.</para>
            /// <para>图格—点图层将被聚合为运行工具时生成的方形或六边形图格。</para>
            /// </summary>
            [Description("Bin")]
            [GPEnumValue("BIN")]
            _BIN,

        }

        /// <summary>
        /// <para>Polygon Layer</para>
        /// <para>The polygon features into which the input points will be aggregated.</para>
        /// <para>输入点将聚合到的面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Polygon Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _polygon_layer { get; set; } = null;


        /// <summary>
        /// <para>Bin Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the bin shape that will be generated to hold the aggregated points.</para>
        ///   <bulletList>
        ///     <bullet_item>Square—Square bins will be generated, in which Bin Size represents the height of a square. This is the default.</bullet_item><para/>
        ///     <bullet_item>Hexagon—Hexagonal bins will be generated, in which Bin Size represents the height between two parallel sides.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将生成的用于保存聚合点的图格形状。</para>
        ///   <bulletList>
        ///     <bullet_item>正方形—将生成正方形图格，其中图格大小表示正方形的高度。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>六边形—将生成六边形条柱，其中条柱大小表示两条平行边之间的高度。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Bin Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _bin_type_value? _bin_type { get; set; } = null;

        public enum _bin_type_value
        {
            /// <summary>
            /// <para>Square</para>
            /// <para>Square—Square bins will be generated, in which Bin Size represents the height of a square. This is the default.</para>
            /// <para>正方形—将生成正方形图格，其中图格大小表示正方形的高度。这是默认设置。</para>
            /// </summary>
            [Description("Square")]
            [GPEnumValue("SQUARE")]
            _SQUARE,

            /// <summary>
            /// <para>Hexagon</para>
            /// <para>Hexagon—Hexagonal bins will be generated, in which Bin Size represents the height between two parallel sides.</para>
            /// <para>六边形—将生成六边形条柱，其中条柱大小表示两条平行边之间的高度。</para>
            /// </summary>
            [Description("Hexagon")]
            [GPEnumValue("HEXAGON")]
            _HEXAGON,

        }

        /// <summary>
        /// <para>Bin Size</para>
        /// <para><xdoc>
        ///   <para>The distance interval that represents the bin size and units into which the Point Layer will be aggregated. The distance interval must be a linear unit.</para>
        ///   <para>The distance interval that represents the Bin Size and units into which the Point Layer will be aggregated. The distance interval must be a linear unit.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>表示点图层将聚合到的图格大小和单位的距离间隔。距离间隔必须是线性单位。</para>
        ///   <para>表示图格大小和点图层将聚合到的单位的距离间隔。距离间隔必须是线性单位。</para>
        /// </xdoc></para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers </para>
        /// </summary>
        [DisplayName("Bin Size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _bin_size { get; set; } = null;


        /// <summary>
        /// <para>Time Step Interval</para>
        /// <para><xdoc>
        ///   <para>A value that specifies the duration of the time step. This parameter is only available if the input points are time enabled and represent an instant in time.</para>
        ///   <para>Time stepping can only be applied if time is enabled on the input.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个值，指定时间步长的持续时间。仅当输入点启用了时间并表示时间中的瞬间时，此参数才可用。</para>
        ///   <para>仅当输入上启用了时间时，才能应用时间步进。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Step Interval")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_interval { get; set; } = null;


        /// <summary>
        /// <para>Time Step Repeat</para>
        /// <para>A value that specifies how often the time-step interval occurs. This parameter is only available if the input points are time enabled and represent an instant in time.</para>
        /// <para>一个值，该值指定时间步长间隔发生的频率。仅当输入点启用了时间并表示时间中的瞬间时，此参数才可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Step Repeat")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_repeat { get; set; } = null;


        /// <summary>
        /// <para>Time Step Reference</para>
        /// <para>A date that specifies the reference time with which to align the time steps. The default is January 1, 1970, at 12:00 a.m. This parameter is only available if the input points are time enabled and represent an instant in time.</para>
        /// <para>指定用于对齐时间步长的参考时间的日期。默认值为 1970 年 1 月 1 日凌晨 12：00。仅当输入点启用了时间并表示时间中的瞬间时，此参数才可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Step Reference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_reference { get; set; } = null;


        /// <summary>
        /// <para>Summary Fields</para>
        /// <para>The statistics that will be calculated on specified fields.</para>
        /// <para>将对指定字段进行计算的统计信息。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summary Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _summary_fields { get; set; } = null;


        /// <summary>
        /// <para>Output Feature Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output { get; set; }


        /// <summary>
        /// <para>Data Store</para>
        /// <para><xdoc>
        ///   <para>Specifies the ArcGIS Data Store where the output will be saved. The default is Spatiotemporal big data store. All results stored in a spatiotemporal big data store will be stored in WGS84. Results stored in a relational data store will maintain their coordinate system.</para>
        ///   <bulletList>
        ///     <bullet_item>Spatiotemporal big data store—Output will be stored in a spatiotemporal big data store. This is the default.</bullet_item><para/>
        ///     <bullet_item>Relational data store—Output will be stored in a relational data store.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将保存输出的 ArcGIS Data Store。默认值为 Spatiotemporal 大数据存储。存储在时空大数据存储中的所有结果都将存储在 WGS84 中。存储在关系数据存储中的结果将保留其坐标系。</para>
        ///   <bulletList>
        ///     <bullet_item>时空大数据存储 - 输出将存储在时空大数据存储中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>关系数据存储 - 输出将存储在关系数据存储中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Data Store")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_store_value _data_store { get; set; } = _data_store_value._SPATIOTEMPORAL_DATA_STORE;

        public enum _data_store_value
        {
            /// <summary>
            /// <para>Spatiotemporal big data store</para>
            /// <para>Spatiotemporal big data store—Output will be stored in a spatiotemporal big data store. This is the default.</para>
            /// <para>时空大数据存储 - 输出将存储在时空大数据存储中。这是默认设置。</para>
            /// </summary>
            [Description("Spatiotemporal big data store")]
            [GPEnumValue("SPATIOTEMPORAL_DATA_STORE")]
            _SPATIOTEMPORAL_DATA_STORE,

            /// <summary>
            /// <para>Relational data store</para>
            /// <para>Relational data store—Output will be stored in a relational data store.</para>
            /// <para>关系数据存储 - 输出将存储在关系数据存储中。</para>
            /// </summary>
            [Description("Relational data store")]
            [GPEnumValue("RELATIONAL_DATA_STORE")]
            _RELATIONAL_DATA_STORE,

        }

        public AggregatePoints SetEnv(object extent = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}